
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>API设计 · book for nxos</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="nxos development team">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://book-os.org" target="_blank" class="custom-link">bookos</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" >
            
                <span>
            
                    
                    NXOS文档中心
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" >
            
                <span>
            
                    
                    简介
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    NXOS 简介
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.2" >
            
                <span>
            
                    
                    快速上手
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.2.1" data-path="../../tutorial/quick-start.html">
            
                <a href="../../tutorial/quick-start.html">
            
                    
                    虚拟平台运行
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.3" >
            
                <span>
            
                    
                    内核
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.1" data-path="../base/framework.html">
            
                <a href="../base/framework.html">
            
                    
                    整体框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3.2" data-path="../base/start.html">
            
                <a href="../base/start.html">
            
                    
                    启动流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3.3" data-path="../mm/mm.html">
            
                <a href="../mm/mm.html">
            
                    
                    内存管理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.3.1" data-path="../mm/buddy.html">
            
                <a href="../mm/buddy.html">
            
                    
                    buddy伙伴算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3.3.2" data-path="../mm/heap.html">
            
                <a href="../mm/heap.html">
            
                    
                    heapCache虚拟内存管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3.3.3" data-path="../mm/vmspace.html">
            
                <a href="../mm/vmspace.html">
            
                    
                    vmspace虚拟地址空间
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.3.4" data-path="../sched/sched.html">
            
                <a href="../sched/sched.html">
            
                    
                    调度管理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.4.1" data-path="../sched/thread.html">
            
                <a href="../sched/thread.html">
            
                    
                    线程管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.3.4.2" data-path="../sched/smp.html">
            
                <a href="../sched/smp.html">
            
                    
                    SMP多核调度
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.3.5" data-path="../process/process.html">
            
                <a href="../process/process.html">
            
                    
                    进程管理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.5.1" data-path="../process/syscall.html">
            
                <a href="../process/syscall.html">
            
                    
                    系统调用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.3.6" data-path="../interrupt/irq.html">
            
                <a href="../interrupt/irq.html">
            
                    
                    中断系统
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.3.6.1" data-path="../interrupt/delay_queue.html">
            
                <a href="../interrupt/delay_queue.html">
            
                    
                    延迟队列
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.3.7" data-path="../timer/timer.html">
            
                <a href="../timer/timer.html">
            
                    
                    定时器
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.4" >
            
                <span>
            
                    
                    内核移植
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.4.1" data-path="../port/riscv/riscv.html">
            
                <a href="../port/riscv/riscv.html">
            
                    
                    riscv架构移植
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.5" >
            
                <span>
            
                    
                    平台支持
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.5.1" data-path="../platform/i386.html">
            
                <a href="../platform/i386.html">
            
                    
                    i386
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.5.2" data-path="../platform/qemu_riscv64.html">
            
                <a href="../platform/qemu_riscv64.html">
            
                    
                    qemu_riscv64
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.5.3" data-path="../platform/k210.html">
            
                <a href="../platform/k210.html">
            
                    
                    k210
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.5.4" data-path="../platform/d1.html">
            
                <a href="../platform/d1.html">
            
                    
                    d1-nezha
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.5.5" data-path="../platform/hifive_unmached.html">
            
                <a href="../platform/hifive_unmached.html">
            
                    
                    hifive unmached
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.6" >
            
                <span>
            
                    
                    用户态服务和驱动框架
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.6.1" data-path="userver.html">
            
                <a href="userver.html">
            
                    
                    用户态服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.6.2" data-path="udriver.html">
            
                <a href="udriver.html">
            
                    
                    用户态驱动
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.6.3" data-path="ubpf.html">
            
                <a href="ubpf.html">
            
                    
                    UBPF
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.7" >
            
                <span>
            
                    
                    用户接口
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.1.7.1" data-path="api.html">
            
                <a href="api.html">
            
                    
                    API设计
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.1.8" >
            
                <span>
            
                    
                    编程开发
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.8.1" data-path="../../tutorial/code-style.html">
            
                <a href="../../tutorial/code-style.html">
            
                    
                    代码风格
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.8.2" data-path="../../tutorial/commit-rule.html">
            
                <a href="../../tutorial/commit-rule.html">
            
                    
                    提交规则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.8.3" data-path="../../tutorial/menuconfig.html">
            
                <a href="../../tutorial/menuconfig.html">
            
                    
                    菜单配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.8.4" data-path="../../tutorial/toolchains.html">
            
                <a href="../../tutorial/toolchains.html">
            
                    
                    工具链
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.8.5" data-path="../../tutorial/utest.html">
            
                <a href="../../tutorial/utest.html">
            
                    
                    单元测试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >API设计</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="api&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x63A5;&#x53E3;">API&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x63A5;&#x53E3;</h1>
<p>&#x672C;&#x6587;&#x6863;&#x5B58;&#x653E;&#x7684;&#x662F;&#x7528;&#x6237;&#x7A0B;&#x5E8F;&#x7684;&#x7F16;&#x7A0B;&#x63A5;&#x53E3;&#x7684;&#x8BBE;&#x8BA1;&#x8BF4;&#x660E;&#x3002;</p>
<p>NXOS&#x7684;API&#x63A5;&#x53E3;&#x5206;&#x4E3A;&#x51E0;&#x4E2A;&#x5927;&#x7C7B;&#x3002;&#x8FDB;&#x7A0B;&#xFF0C;&#x7EBF;&#x7A0B;&#xFF0C;&#x5185;&#x5B58;&#x7BA1;&#x7406;&#xFF0C;&#x65F6;&#x95F4;&#x7BA1;&#x7406;&#xFF0C;&#x67A2;&#x7EBD;&#x7CFB;&#x7EDF;&#xFF0C;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#xFF0C;&#x8BBE;&#x5907;&#x7BA1;&#x7406;&#xFF0C;&#x7F51;&#x7EDC;&#x7BA1;&#x7406;&#xFF0C;&#x56FE;&#x5F62;&#x7BA1;&#x7406;&#xFF0C;&#x5B89;&#x5168;&#x7BA1;&#x7406;&#xFF0C;&#x7528;&#x6237;&#x6001;&#x9A71;&#x52A8;&#x6846;&#x67B6;&#x3002;</p>
<h2 id="&#x8FDB;&#x7A0B;&#x7BA1;&#x7406;">&#x8FDB;&#x7A0B;&#x7BA1;&#x7406;</h2>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x521B;&#x5EFA;&#x8FDB;&#x7A0B;</td>
<td>int ProcessCreate(char <em>name, char </em>path, int flags, char <em>cmd, void </em>env)</td>
</tr>
<tr>
<td>&#x9000;&#x51FA;&#x8FDB;&#x7A0B;</td>
<td>void ProcessExit(int exitCode)</td>
</tr>
<tr>
<td>&#x7EC8;&#x6B62;&#x8FDB;&#x7A0B;</td>
<td>int ProcessTerminate(int pid)</td>
</tr>
<tr>
<td>&#x83B7;&#x53D6;&#x8FDB;&#x7A0B;ID</td>
<td>int ProcessGetId(void)</td>
</tr>
<tr>
<td>&#x7B49;&#x5F85;&#x8FDB;&#x7A0B;&#x9000;&#x51FA;</td>
<td>int ProcessWait(int pid, int timeout, int flags)</td>
</tr>
</tbody>
</table>
<h2 id="&#x7EBF;&#x7A0B;&#x7BA1;&#x7406;">&#x7EBF;&#x7A0B;&#x7BA1;&#x7406;</h2>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x521B;&#x5EFA;&#x7EBF;&#x7A0B;</td>
<td>int ThreadCreate(ThreadHandler handler, void *arg, USize stackSize, int flags)</td>
</tr>
<tr>
<td>&#x9000;&#x51FA;&#x7EBF;&#x7A0B;</td>
<td>void ThreadExit(int exitCode)</td>
</tr>
<tr>
<td>&#x83B7;&#x53D6;&#x7EBF;&#x7A0B;ID</td>
<td>int ThreadGetId(void)</td>
</tr>
<tr>
<td>&#x7EC8;&#x6B62;&#x7EBF;&#x7A0B;</td>
<td>int ThreadTerminate(int tid)</td>
</tr>
<tr>
<td>&#x6302;&#x8D77;&#x7EBF;&#x7A0B;</td>
<td>int ThreadSuspend(int tid)</td>
</tr>
<tr>
<td>&#x6062;&#x590D;&#x7EBF;&#x7A0B;</td>
<td>int ThreadResume(int tid)</td>
</tr>
<tr>
<td>&#x7B49;&#x5F85;&#x7EBF;&#x7A0B;&#x9000;&#x51FA;</td>
<td>int ThreadWait(int tid, int timeout, int flags)</td>
</tr>
<tr>
<td>&#x521B;&#x5EFA;&#x4E92;&#x65A5;&#x4F53;</td>
<td>Mutex <em>MutexCreate(int attr, char </em>name)</td>
</tr>
<tr>
<td>&#x5220;&#x9664;&#x4E92;&#x65A5;&#x4F53;</td>
<td>int MutexDelete(Mutex *mutex)</td>
</tr>
<tr>
<td>&#x521D;&#x59CB;&#x5316;&#x4E92;&#x65A5;&#x4F53;</td>
<td>int MutexInit(Mutex <em>mutex, int attr, char </em>name)</td>
</tr>
<tr>
<td>&#x83B7;&#x53D6;&#x4E92;&#x65A5;&#x4F53;</td>
<td>int MutexAcquire(Mutex *mutex)</td>
</tr>
<tr>
<td>&#x91CA;&#x653E;&#x4E92;&#x65A5;&#x4F53;</td>
<td>int MutexRelease(Mutex *mutex)</td>
</tr>
<tr>
<td>&#x5C1D;&#x8BD5;&#x83B7;&#x53D6;&#x4E92;&#x65A5;&#x4F53;</td>
<td>int MutexTryAcquire(Mutex *mutex)</td>
</tr>
<tr>
<td>&#x521B;&#x5EFA;&#x6761;&#x4EF6;&#x53D8;&#x91CF;</td>
<td>Condition <em>ConditionCreate(int attr, char </em>name)</td>
</tr>
<tr>
<td>&#x5220;&#x9664;&#x6761;&#x4EF6;&#x53D8;&#x91CF;</td>
<td>int ConditionDelete(Condition *cond)</td>
</tr>
<tr>
<td>&#x521D;&#x59CB;&#x5316;&#x6761;&#x4EF6;&#x53D8;&#x91CF;</td>
<td>int ConditionInit(Condition <em>cond, int attr, char </em>name)</td>
</tr>
<tr>
<td>&#x4F11;&#x7720;&#x7B49;&#x5F85;&#x6761;&#x4EF6;&#x53D8;&#x91CF;</td>
<td>int ConditionSleep(Condition <em>cond, Mutex </em>mutex)</td>
</tr>
<tr>
<td>&#x5524;&#x9192;&#x4F11;&#x7720;&#x7B49;&#x5F85;&#x6761;&#x4EF6;&#x7684;&#x5355;&#x4E2A;&#x7EBF;&#x7A0B;</td>
<td>int ConditionWake(Condition *cond)</td>
</tr>
<tr>
<td>&#x5524;&#x9192;&#x4F11;&#x7720;&#x7B49;&#x5F85;&#x6761;&#x4EF6;&#x7684;&#x5168;&#x90E8;&#x7EBF;&#x7A0B;</td>
<td>int ConditionWakeAll(Condition *cond)</td>
</tr>
<tr>
<td>&#x5206;&#x914D;&#x4E00;&#x4E2A;tls</td>
<td>int TlsAlloc(void)</td>
</tr>
<tr>
<td>&#x91CA;&#x653E;&#x4E00;&#x4E2A;tls</td>
<td>int TlsFree(int tlsIndex)</td>
</tr>
<tr>
<td>&#x8BBE;&#x7F6E;tls&#x7684;&#x503C;</td>
<td>int TlsSetValue(int tlsIndex, void *value)</td>
</tr>
<tr>
<td>&#x83B7;&#x53D6;tls&#x7684;&#x503C;</td>
<td>void TlsGetValue(int tlsIndex)</td>
</tr>
</tbody>
</table>
<h2 id="&#x5185;&#x5B58;&#x7BA1;&#x7406;">&#x5185;&#x5B58;&#x7BA1;&#x7406;</h2>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x5206;&#x914D;&#x5185;&#x5B58;</td>
<td>void *MemAlloc(USize size)</td>
</tr>
<tr>
<td>&#x91CA;&#x653E;&#x5185;&#x5B58;</td>
<td>int MemFree(void *object)</td>
</tr>
<tr>
<td>&#x6620;&#x5C04;&#x5185;&#x5B58;</td>
<td>void <em>MemMap(void </em>addr, USize size, int attr)</td>
</tr>
<tr>
<td>&#x89E3;&#x9664;&#x6620;&#x5C04;&#x5185;&#x5B58;</td>
<td>int MemUnmap(void *addr)</td>
</tr>
<tr>
<td>&#x590D;&#x5236;&#x5185;&#x5B58;</td>
<td>void MemCopy(void <em>dest, void </em>src, USize size)</td>
</tr>
<tr>
<td>&#x79FB;&#x52A8;&#x5185;&#x5B58;</td>
<td>void MemMove(void <em>dest, void </em>src, USize size)</td>
</tr>
<tr>
<td>&#x586B;&#x5145;&#x5185;&#x5B58;</td>
<td>void MemFill(void *addr, USize size, U8 value)</td>
</tr>
<tr>
<td>&#x6E05;&#x7A7A;&#x5185;&#x5B58;</td>
<td>void MemZero(void *addr, USize size)</td>
</tr>
</tbody>
</table>
<h2 id="&#x65F6;&#x95F4;&#x7BA1;&#x7406;">&#x65F6;&#x95F4;&#x7BA1;&#x7406;</h2>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x83B7;&#x53D6;&#x5F53;&#x524D;&#x7684;&#x65F6;&#x95F4;</td>
<td>void TimeGetCurrent(TimeSytem *time)</td>
</tr>
<tr>
<td>&#x8BBE;&#x7F6E;&#x5F53;&#x524D;&#x7684;&#x65F6;&#x95F4;</td>
<td>void TimeSetCurrent(TimeSytem *time)</td>
</tr>
<tr>
<td>&#x83B7;&#x53D6;&#x7CFB;&#x7EDF;&#x8FD0;&#x884C;&#x7684;&#x65F6;&#x95F4;</td>
<td>USize TimeGetClock(void)</td>
</tr>
</tbody>
</table>
<h2 id="&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;">&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;</h2>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x521B;&#x5EFA;&#x6587;&#x4EF6;</td>
<td>NX_Error NX_FileCreate(char *path, int attr)</td>
</tr>
<tr>
<td>&#x5220;&#x9664;&#x6587;&#x4EF6;</td>
<td>NX_Error NX_FileDelete(char *path)</td>
</tr>
<tr>
<td>&#x6253;&#x5F00;&#x6587;&#x4EF6;</td>
<td>NX_FD NX_FileOpen(char *path, int flags, int attr)</td>
</tr>
<tr>
<td>&#x5173;&#x95ED;&#x6587;&#x4EF6;</td>
<td>NX_Error NX_FileClose(NX_FD fd)</td>
</tr>
<tr>
<td>&#x8BFB;&#x53D6;&#x6587;&#x4EF6;</td>
<td>SSize NX_FileRead(NX_FD fd, void *buf, USize bytes)</td>
</tr>
<tr>
<td>&#x5199;&#x5165;&#x6587;&#x4EF6;</td>
<td>SSize NX_FileWrite(NX_FD fd, void *buf, USize bytes)</td>
</tr>
<tr>
<td>&#x7D22;&#x5F15;&#x6587;&#x4EF6;</td>
<td>Offset NX_FileSeek(NX_FD fd, Offset offset, int seekMethod)</td>
</tr>
<tr>
<td>&#x83B7;&#x53D6;&#x6587;&#x4EF6;&#x504F;&#x79FB;</td>
<td>Offset NX_FileTellOffset(NX_FD fd)</td>
</tr>
<tr>
<td>&#x68C0;&#x67E5;&#x6587;&#x4EF6;&#x7ED3;&#x675F;</td>
<td>NX_Bool NX_FileIsEnd(NX_FD fd)</td>
</tr>
<tr>
<td>&#x68C0;&#x67E5;&#x6587;&#x4EF6;&#x7ED3;&#x675F;</td>
<td>NX_Bool NX_FileAccess(char *path, int attr)</td>
</tr>
<tr>
<td>&#x521B;&#x5EFA;&#x76EE;&#x5F55;</td>
<td>NX_Bool NX_DirectoryCreate(char *path, int attr)</td>
</tr>
<tr>
<td>&#x5220;&#x9664;&#x76EE;&#x5F55;</td>
<td>NX_Bool NX_DirectoryDelete(char *path)</td>
</tr>
<tr>
<td>&#x6253;&#x5F00;&#x76EE;&#x5F55;</td>
<td>NX_Dir DirectoryOpen(char *path, int flags)</td>
</tr>
<tr>
<td>&#x5173;&#x95ED;&#x76EE;&#x5F55;</td>
<td>NX_Error DirectoryClose(NX_Dir dir)</td>
</tr>
<tr>
<td>&#x8BFB;&#x53D6;&#x76EE;&#x5F55;</td>
<td>NX_DirEntry *DirectoryRead(NX_Dir dir)</td>
</tr>
<tr>
<td>&#x91CD;&#x7F6E;&#x8BFB;&#x53D6;&#x4F4D;&#x7F6E;</td>
<td>NX_Error DirectoryRewind(NX_Dir dir)</td>
</tr>
</tbody>
</table>
<h2 id="&#x7F51;&#x7EDC;&#x7CFB;&#x7EDF;">&#x7F51;&#x7EDC;&#x7CFB;&#x7EDF;</h2>
<p>&#x53C2;&#x8003;socket&#x5957;&#x63A5;&#x5B57;&#x63A5;&#x53E3;&#x8BBE;&#x8BA1;</p>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>
<h2 id="&#x8BBE;&#x5907;&#x7BA1;&#x7406;">&#x8BBE;&#x5907;&#x7BA1;&#x7406;</h2>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x521B;&#x5EFA;&#x8BBE;&#x5907;</td>
<td>int DeviceCreate(char *path, int attr)</td>
</tr>
<tr>
<td>&#x5220;&#x9664;&#x8BBE;&#x5907;</td>
<td>int DeviceDelete(char *path)</td>
</tr>
<tr>
<td>&#x6253;&#x5F00;&#x8BBE;&#x5907;</td>
<td>int DeviceOpen(char *path, int flags)</td>
</tr>
<tr>
<td>&#x5173;&#x95ED;&#x8BBE;&#x5907;</td>
<td>int DeviceClose(int dev)</td>
</tr>
<tr>
<td>&#x8BFB;&#x53D6;&#x8BBE;&#x5907;</td>
<td>ISize DeviceRead(int dev, void *buf, USize len, Offset offset)</td>
</tr>
<tr>
<td>&#x5199;&#x5165;&#x8BBE;&#x5907;</td>
<td>ISize DeviceWrite(int dev, void *buf, USize len, Offset offset)</td>
</tr>
<tr>
<td>&#x5199;&#x5165;&#x8BBE;&#x5907;</td>
<td>ISize DeviceControl(int dev, int cmd, void *arg)</td>
</tr>
</tbody>
</table>
<h2 id="&#x67A2;&#x7EBD;&#x7CFB;&#x7EDF;">&#x67A2;&#x7EBD;&#x7CFB;&#x7EDF;</h2>
<p>&#x7B49;hub system&#x8BBE;&#x8BA1;&#x597D;&#x4E86;&#x518D;&#x8BBE;&#x8BA1;&#x63A5;&#x53E3;&#xFF0C;&#x76EE;&#x524D;&#x8FD8;&#x6CA1;&#x6709;&#x6982;&#x5FF5;</p>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>
<h2 id="&#x56FE;&#x5F62;&#x7CFB;&#x7EDF;">&#x56FE;&#x5F62;&#x7CFB;&#x7EDF;</h2>
<p>&#x6682;&#x4E0D;&#x8BBE;&#x8BA1;&#xFF0C;&#x7B49;&#x5185;&#x6838;&#x57FA;&#x672C;&#x529F;&#x80FD;&#x5B8C;&#x6210;&#x540E;&#x518D;&#x8BBE;&#x8BA1;</p>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>
<h2 id="&#x5B89;&#x5168;&#x7BA1;&#x7406;">&#x5B89;&#x5168;&#x7BA1;&#x7406;</h2>
<p>&#x6682;&#x4E0D;&#x9700;&#x8981;</p>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>
<h2 id="&#x7528;&#x6237;&#x6001;&#x9A71;&#x52A8;&#x6846;&#x67B6;">&#x7528;&#x6237;&#x6001;&#x9A71;&#x52A8;&#x6846;&#x67B6;</h2>
<p>&#x7B49;&#x5185;&#x6838;&#x57FA;&#x7840;&#x529F;&#x80FD;&#x5B8C;&#x6210;&#x540E;&#x5B9E;&#x73B0;</p>
<table>
<thead>
<tr>
<th>&#x529F;&#x80FD;</th>
<th>&#x51FD;&#x6570;</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</tbody>
</table>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"API设计","level":"1.1.7.1","depth":3,"next":{"title":"编程开发","level":"1.1.8","depth":2,"ref":"","articles":[{"title":"代码风格","level":"1.1.8.1","depth":3,"path":"tutorial/code-style.md","ref":"tutorial/code-style.md","articles":[]},{"title":"提交规则","level":"1.1.8.2","depth":3,"path":"tutorial/commit-rule.md","ref":"tutorial/commit-rule.md","articles":[]},{"title":"菜单配置","level":"1.1.8.3","depth":3,"path":"tutorial/menuconfig.md","ref":"tutorial/menuconfig.md","articles":[]},{"title":"工具链","level":"1.1.8.4","depth":3,"path":"tutorial/toolchains.md","ref":"tutorial/toolchains.md","articles":[]},{"title":"单元测试","level":"1.1.8.5","depth":3,"path":"tutorial/utest.md","ref":"tutorial/utest.md","articles":[]}]},"previous":{"title":"用户接口","level":"1.1.7","depth":2,"ref":"","articles":[{"title":"API设计","level":"1.1.7.1","depth":3,"path":"programing-manual/user/api.md","ref":"programing-manual/user/api.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy BookOS-developers 2022","modify_label":"修订时间：","modify_format":"YYYY-MM-DD"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"nxos development team","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"book for nxos","language":"zh-hans","links":{"sidebar":{"bookos":"http://book-os.org"}},"gitbook":"3.2.3","description":"document for nxos kernel"},"file":{"path":"programing-manual/user/api.md","mtime":"2022-05-03T18:23:23.519Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-05-06T18:41:01.186Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

